package Object_2;

public class Animal {
    private String name;
    private int age;
    public void eat(){
        System.out.println(name + "正在吃饭");
    }
    public void sleep(){
        System.out.println(name + "正在睡觉");
    }
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return name;
    }
}
